//
//  MYLine.h
//
//
//  Created by Robin on 16/12/10.
//  Copyright © 2016年 HolyShit. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, MYDirection) {
    MYDirectionTop      = 1 << 0,
    MYDirectionBottom   = 1 << 1,
    MYDirectionLeft     = 1 << 2,
    MYDirectionRight    = 1 << 3
};

/* Direction Pading */

struct MYPading {
    CGFloat left;
    CGFloat right;
    CGFloat top;
    CGFloat bottom;
};
typedef struct MYPading MYPading;
MYPading MYPadingMake(CGFloat _left, CGFloat _right, CGFloat _top, CGFloat _bottom);


/* Direction Pading End /*/

@interface MYLine : UIView

@end

@interface UIView (MY_ShowLine)
///显示某个方向的线（上下左右）
-(void)showLineForDirection:(MYDirection)direction;
///显示某个方向的线，间距是padding
-(void)showLineForDirection:(MYDirection)direction pading:(MYPading)pading;
///显示某方向的线和左边间距（一般是上下线）
-(void)showLineForDirection:(MYDirection)direction leftPad:(CGFloat)pad;
///显示上下线和左边间距
-(void)showLineForHorizontalWithLeftPad:(CGFloat)pad;
///显示垂直的线，也就是左右
-(void)showLineForVertical;
///显示水平的线，也就是上下
-(void)showLineForHorizontal;
///隐藏某个方向的线
-(void)hideLineForDirection:(MYDirection)direction;
///隐藏垂直（左右）的线
-(void)hideLineForVertical;
///隐藏水平（上下）的线
-(void)hideLineForHorizontal;
///获取某个方向的线
-(MYLine *)lineWithDirection:(MYDirection)direction;
-(void)manualSetBgColor:(UIColor *)color;

@end
